x86/vIRQ: IRR and TMR race condition bug fix
authorYongan Liu <Liuyongan@huawei.com>
Thu, 5 Jan 2012 08:29:59 +0000 (09:29 +0100)
committerYongan Liu <Liuyongan@huawei.com>
Thu, 5 Jan 2012 08:29:59 +0000 (09:29 +0100)
commitb4799791c1e88341688142408051e65867bcdf82
tree2ab5b878c79421032d3c270d0cc105294ca2f0f3
parenta33389c34e9dd9e4877dd96c5b189fc9d6230ff7
x86/vIRQ: IRR and TMR race condition bug fix

In vlapic_set_irq, we set the IRR register before the TMR. And the IRR
might be serviced before setting TMR, and even worse EOI might occur
before TMR setting, in which case the vioapic_update_EOI won't be
called, and further prevent all the subsequent interrupt injecting.
Reorder setting the TMR and IRR will solve the problem.

Besides, KVM has fixed a similar bug in:
http://markmail.org/search/?q=APIC_TMR#query:APIC_TMR+page:1+mid:rphs4f7lkxjlldne+state:results

Signed-off-by: Yongan Liu<Liuyongan@huawei.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Committed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/hvm/vlapic.c